package com.example.nbug.component;

/**
 * @author: 杰
 * @date: 2024/7/21 8:09
 */
public class ResultUtils {

    public static <T> ApiResponse<T> success(T data) {
        return new ApiResponse<>(200, data, "OK");
    }

    public static <T> ApiResponse<T> error(int code, String message) {
        return new ApiResponse<>(code, null, message);
    }
}
